[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FCREATE IEXP1,SEXP,IEXP2,IEXP3

 Function
  Use channel IEXP1 to create and open file SEXP in access mode
  IEXP2 and share mode IEXP3
  (valid channels = 0 - 7 [0 is used for script questionnaires])
  (valid access modes = O_RD, O_WR, O_RW [should use O_WR])
  (valid share modes = S_DN, S_DR, S_DW, S_DB)

 Syntax
  FCREATE chan,file,am,sm

   chan  - An integer expression with the channel to use for the file
           (0 through 7).
   file  - A string expression with the file specification to create
           and open.
   am    - An integer expression with the desired access mode for the file.
   sm    - An integer expression with the desired share mode flags for
           the file.

 Remarks
  This statement allows a PPL application to force the creation and
  opening of a file, even if it already exists.  Creation means that any
  information previously in the file (if it already exists) will be lost
  and you will be starting over with an empty file.  The chan parameter
  must be 0 through 7; 0 is reserved for the answer file when a PPL script
  questionnaire is in use but is available for all other applications.
  However, it is recommended you avoid channel 0 unless you really need to
  open 8 files at once.  The am parameter should be one of the following
  constants:

   O_RD   open with read access
   O_WR   open with write access
   O_RW   open with read/write access

  Note that the FCREATE statement forces the creation of an empty file
  so it doesn't make much sense to use O_RD, as there is nothing to read,
  unless you only want to create the file.  The sm parameter should be one
  of the following constants:

   S_DN   deny none sharing
   S_DR   deny read sharing
   S_DW   deny write sharing
   S_DB   deny both sharing

 Examples
  FCREATE 1,"C:\PCB\MAIN\PPE.LOG",O_WR,S_DN
  FPUTLN 1,"Creating PPE.LOG file . . ."
  FCLOSE 1

See Also: FAPPEND FCLOSE FOPEN FREWIND
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson